//
//  LoginSingleton.h
//  CleanerAir_Project
//
//  Created by 付亚杰 on 16/6/12.
//  Copyright © 2016年 Beijing Colin El Internet. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CALoginModel.h"
#import "PersonalInformationModel.h"
//#import "AMapPOISearchBaseRequest.h"
#import <AMapSearchKit/AMapSearchKit.h>
#import <MAMapKit/MAMapKit.h>


typedef NS_ENUM(NSInteger, LoginSingletonNetworkStatus) {
    Unknown          = -1,
    NotReachable     = 0,
    ReachableViaWWAN = 1,
    ReachableViaWiFi = 2,
};

@interface LoginSingleton : NSObject

//是否第一次启动
@property (nonatomic, assign) BOOL isFirstStart;

//当前位置
@property (nonatomic, strong) AMapReGeocodeSearchResponse *searchBaseRequest;

///实时网络情况
@property (nonatomic, assign) LoginSingletonNetworkStatus netWorkStatus;

//用户登录信息model
@property (nonatomic, strong) CALoginModel *loginModel;

//我的信息
@property (nonatomic, strong) PersonalInformationModel *perInfoModel;

@property (nonatomic, copy) NSString *cuid;//妙莲登录 token


@property (nonatomic, copy) NSString *token;

+ (instancetype)sharedLoginSingleton;

//登录成功后调用保存用户信息到本地
- (void)loginSuccess:(NSDictionary *)responseObject;

//退出登录
- (BOOL)loginOut;

// 取消某个本地推送通知
+ (void)cancelLocalNotificationWithKey:(NSString *)key;

#pragma mark -- 获取个人信息
- (void)getPerserInfoWithsuccess:(void (^)(AFHTTPRequestOperation * operation, id  responseObject))success failure:(void (^)(AFHTTPRequestOperation * operation, NSError * error))failure;

@end
